import 'package:kkhousekeep/generated/json/base/json_convert_content.dart';
import 'package:kkhousekeep/models/home_village_entity.dart';

HomeVillageEntity $HomeVillageEntityFromJson(Map<String, dynamic> json) {
	final HomeVillageEntity homeVillageEntity = HomeVillageEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		homeVillageEntity.code = code;
	}
	final List<HomeVillageObj>? obj = jsonConvert.convertListNotNull<HomeVillageObj>(json['obj']);
	if (obj != null) {
		homeVillageEntity.obj = obj;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		homeVillageEntity.msg = msg;
	}
	return homeVillageEntity;
}

Map<String, dynamic> $HomeVillageEntityToJson(HomeVillageEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['obj'] =  entity.obj.map((v) => v.toJson()).toList();
	data['msg'] = entity.msg;
	return data;
}

HomeVillageObj $HomeVillageObjFromJson(Map<String, dynamic> json) {
	final HomeVillageObj homeVillageObj = HomeVillageObj();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		homeVillageObj.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		homeVillageObj.name = name;
	}
	return homeVillageObj;
}

Map<String, dynamic> $HomeVillageObjToJson(HomeVillageObj entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	return data;
}